package com.gking.aiService.controller;


import com.gking.aiService.common.Result;
import com.gking.aiService.common.ResultResponse;
import com.gking.aiService.serviceUtils.RemoteInteraction.RemoteInteractionService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * 远程交互
 */
@Slf4j
@RestController
@RequestMapping("/remote")
public class RemoteInteractionController {


    @Autowired
    private RemoteInteractionService remoteInteractionService;


    /**
     * 退出登录
     *
     * @return s
     */
    @PostMapping("/user/logout")
    public Result<String> logout() {
        return remoteInteractionService.logout();
    }

    /**
     * 获取用户角色详情
     *
     * @return s
     */
//    @GetMapping("/getUserRoles")
    public ResultResponse getUserRolesDetail() {
        return remoteInteractionService.getUserRolesDetail();
    }

    /**
     * 获取角色权限详情
     *
     * @param roleId 角色id
     * @return s
     */
//    @GetMapping("/rolePermissionsDetail/{roleId}")
    public ResultResponse getRolePermissionsDetail(@PathVariable String roleId) {
        return remoteInteractionService.getRolePermissionsDetail(roleId);
    }


    /**
     * 获取用户登录缓存的凭证信息
     */
    public void getUserLoginAuth() {
    }
}
